package com.zrrd.learn.chapter08面向对象.pattern.factory;

/**
 * 小王同学
 *
 * @author wrn
 * @version 1.0
 * @date 2023/8/3 10:32
 */

public class LittleWang {

    public static void main(String[] args) {
        Cat c1=CatFactory.instanceCatByName("大宝");
        System.out.println(c1.getName());

        Cat c2=CatFactory.instanceCat("大宝","波斯猫");
        System.out.println (c1.getName());
    }

}
